/******************************************************************************
 * Product: Adempiere ERP & CRM Smart Business Solution                       *
 * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved.                *
 * This program is free software, you can redistribute it and/or modify it    *
 * under the terms version 2 of the GNU General Public License as published   *
 * by the Free Software Foundation. This program is distributed in the hope   *
 * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.           *
 * See the GNU General Public License for more details.                       *
 * You should have received a copy of the GNU General Public License along    *
 * with this program, if not, write to the Free Software Foundation, Inc.,    *
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.                     *
 * For the text or an alternative of this public license, you may reach us    *
 * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA        *
 * or via info@compiere.org or http://www.compiere.org/license.html           *
 *****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;

import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.util.KeyNamePair;

/** Generated Model for A_Commission
 *  @author Adempiere (generated) 
 *  @version Release 3.7.0LTS - $Id$ */
public class X_A_Commission extends PO implements I_A_Commission, I_Persistent 
{

	/**
	 *
	 */
	private static final long serialVersionUID = 20130103L;

    /** Standard Constructor */
    public X_A_Commission (Properties ctx, int A_Commission_ID, String trxName)
    {
      super (ctx, A_Commission_ID, trxName);
      /** if (A_Commission_ID == 0)
        {
			setA_Commission_ID (0);
			setchairman_id (0);
			setName (null);
			setValue (null);
        } */
    }

    /** Load Constructor */
    public X_A_Commission (Properties ctx, ResultSet rs, String trxName)
    {
      super (ctx, rs, trxName);
    }

    /** AccessLevel
      * @return 3 - Client - Org 
      */
    protected int get_AccessLevel()
    {
      return accessLevel.intValue();
    }

    /** Load Meta Data */
    protected POInfo initPO (Properties ctx)
    {
      POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
      return poi;
    }

    public String toString()
    {
      StringBuffer sb = new StringBuffer ("X_A_Commission[")
        .append(get_ID()).append("]");
      return sb.toString();
    }

	/** Set Commission.
		@param A_Commission_ID Commission	  */
	public void setA_Commission_ID (int A_Commission_ID)
	{
		if (A_Commission_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_A_Commission_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_A_Commission_ID, Integer.valueOf(A_Commission_ID));
	}

	/** Get Commission.
		@return Commission	  */
	public int getA_Commission_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_A_Commission_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public org.compiere.model.I_C_BPartner getchairman() throws RuntimeException
    {
		return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name)
			.getPO(getchairman_id(), get_TrxName());	}

	/** Set chairman_id.
		@param chairman_id chairman_id	  */
	public void setchairman_id (int chairman_id)
	{
		set_Value (COLUMNNAME_chairman_id, Integer.valueOf(chairman_id));
	}

	/** Get chairman_id.
		@return chairman_id	  */
	public int getchairman_id () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_chairman_id);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public org.compiere.model.I_C_BPartner getmember1() throws RuntimeException
    {
		return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name)
			.getPO(getmember1_id(), get_TrxName());	}

	/** Set member1_id.
		@param member1_id member1_id	  */
	public void setmember1_id (int member1_id)
	{
		set_Value (COLUMNNAME_member1_id, Integer.valueOf(member1_id));
	}

	/** Get member1_id.
		@return member1_id	  */
	public int getmember1_id () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_member1_id);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public org.compiere.model.I_C_BPartner getmember2() throws RuntimeException
    {
		return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name)
			.getPO(getmember2_id(), get_TrxName());	}

	/** Set member2_id.
		@param member2_id member2_id	  */
	public void setmember2_id (int member2_id)
	{
		set_Value (COLUMNNAME_member2_id, Integer.valueOf(member2_id));
	}

	/** Get member2_id.
		@return member2_id	  */
	public int getmember2_id () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_member2_id);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public org.compiere.model.I_C_BPartner getmember3() throws RuntimeException
    {
		return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name)
			.getPO(getmember3_id(), get_TrxName());	}

	/** Set member3_id.
		@param member3_id member3_id	  */
	public void setmember3_id (int member3_id)
	{
		set_Value (COLUMNNAME_member3_id, Integer.valueOf(member3_id));
	}

	/** Get member3_id.
		@return member3_id	  */
	public int getmember3_id () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_member3_id);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public org.compiere.model.I_C_BPartner getmember4() throws RuntimeException
    {
		return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name)
			.getPO(getmember4_id(), get_TrxName());	}

	/** Set member4_id.
		@param member4_id member4_id	  */
	public void setmember4_id (int member4_id)
	{
		set_Value (COLUMNNAME_member4_id, Integer.valueOf(member4_id));
	}

	/** Get member4_id.
		@return member4_id	  */
	public int getmember4_id () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_member4_id);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public org.compiere.model.I_C_BPartner getmember5() throws RuntimeException
    {
		return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name)
			.getPO(getmember5_id(), get_TrxName());	}

	/** Set member5_id.
		@param member5_id member5_id	  */
	public void setmember5_id (int member5_id)
	{
		set_Value (COLUMNNAME_member5_id, Integer.valueOf(member5_id));
	}

	/** Get member5_id.
		@return member5_id	  */
	public int getmember5_id () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_member5_id);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Name.
		@param Name 
		Alphanumeric identifier of the entity
	  */
	public void setName (String Name)
	{
		set_Value (COLUMNNAME_Name, Name);
	}

	/** Get Name.
		@return Alphanumeric identifier of the entity
	  */
	public String getName () 
	{
		return (String)get_Value(COLUMNNAME_Name);
	}

    /** Get Record ID/ColumnName
        @return ID/ColumnName pair
      */
    public KeyNamePair getKeyNamePair() 
    {
        return new KeyNamePair(get_ID(), getName());
    }

	/** Set Search Key.
		@param Value 
		Search key for the record in the format required - must be unique
	  */
	public void setValue (String Value)
	{
		set_Value (COLUMNNAME_Value, Value);
	}

	/** Get Search Key.
		@return Search key for the record in the format required - must be unique
	  */
	public String getValue () 
	{
		return (String)get_Value(COLUMNNAME_Value);
	}
}